Optimizing a FIFO, scalable spin lock using consistent memory
نویسنده
چکیده
This paper presents a FIFO queue-based spin lock that (1) uses only one atomic swap operation; (2) is scalable as it requires a constant amount of communication; (3) runs without a coherent cache support; and (4) provides a timing guarantee required for real-time applications. The algorithm is optimal in terms of the number of atomic operations required to solve a scalable mutual exclusion problem in NUMA architectures, improving on Craig's spin lock 5] that uses four atomic swap operations. It minimizes the number of atomic operations by replacing them with non-atomic read and write operations. This optimization can beneet greatly from modern multiprocessors where non-atomic memory operations are much more optimized than atomic operations. The algorithm runs correctly in various weakly consistent memories, providing a potentially signiicant speed-up over the algorithms with more atomic operations.
منابع مشابه
Fast and Scalable, Lock-Free k-FIFO Queues
We introduce fast and scalable algorithms that implement boundedand unbounded-size lock-free k-FIFO queues on parallel, shared memory hardware. Logically, a k-FIFO queue can be understood as queue where elements may be dequeued out-of-order up to k 1, or as pool where the oldest element is dequeued within at most k dequeue operations. The presented algorithms enable up to k enqueue and k dequeu...
متن کاملLock cohorting: A general technique for designing NUMA locks Citation
Multicore machines are quickly shifting to NUMA and CC-NUMA architectures, making scalable NUMA-aware locking algorithms, ones that take into account the machines’ non-uniform memory and caching hierarchy, ever more important. This paper presents lock cohorting, a general new technique for designing NUMA-aware locks that is as simple as it is powerful. Lock cohorting allows one to transform any...
متن کاملCache-Aware Lock-Free Queues for Multiple Producers/Consumers and Weak Memory Consistency
A lock-free FIFO queue data structure is presented in this paper. The algorithm supports multiple producers and multiple consumers and weak memory models. It has been designed to be cache-aware and work directly on weak memory models. It utilizes the cache behavior in concert with lazy updates of shared data, and a dynamic lock-free memory management scheme to decrease unnecessary synchronizati...
متن کاملRH Lock: A Scalable Hierarchical Spin Lock
Scalable architectures with non-uniform memory access time (NUMAs) have gained increased popularity in recent years. The increased scalability have increased the demand for scalable lock implementations, such as the queue-based locks of Mellor-Crummey and Scott (MCS lock), and of Craig, Landin and Hagersten (CLH lock). This paper demonstrates that the first-come first-served nature of queue-bas...
متن کاملcalable Synchronization on
Busy-wait techniques are heavily used for mutual exclusion and barrier synchronization in shared-memory parallel programs Unfortunately, typical implementations of busy-waiting tend to produce large amounts of memory and interconnect contention, introducing performance bottlenecks that become markedly more pronounced as applications scale. We argue that this problem is not fundamental, and that...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1996